//
//  MobileAdView.h
//  AdAtDaum
//
//  Created by yujeong on 10. 11. 2..
/*
 * Copyright (c) 2007-2011, All-Seeing Interactive
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the All-Seeing Interactive nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY All-Seeing Interactive ''AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL All-Seeing Interactive BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 A different license may apply to other software included in this package, 
 including GHUnit and Andrew Donoho's Reachability class. Please consult their 
 respective headers for the terms of their individual licenses.
 */
//

#import <UIKit/UIKit.h>

@protocol MobileAdViewDelegate;

@interface MobileAdView : UIView {
}
@property (assign) NSObject <MobileAdViewDelegate> *addelegate;

/** 초기화와 광고 개시
 이 메소드는 최초 MobileAdView를 초기화 함과 동시에 광고 요청을 시작하는 메소드이다.
 @param delegate MobileAdViewDelegate instance로 MobileAdView 클래스 동작중에 일어나는 모든 이벤트 발생시 delegate를 통해 전달한다. 또한, 광고요청에 필요한 모든 정보를 요청할 때도 delegate를 통해서 확인된다.
 @return MobileAdView를 생성하여 반환한다. 이 때 생성된 instance의 자세한 사용예는 예제프로그램을 통해 확인할 수 있다.
 */
+(MobileAdView*)requestAdWithDelegate:(id)delegate;


/** 광고 갱신 요청
 최초 광고요청 이후 광고를 갱신할 때 호출한다.
 */
-(void)requestRefreshAd;


/** 광고 view가 광고를 가지고 있는지 확인
 이 메소드를 통해 광고 view가 현재 광고를 가지고 있는지 여부를 알 수 있다.
 만일 광고요청 실패시 광고가 없는 빈 화면을 화면에 나타내고 싶지 않다면, 이 함수를 이용해 기존 광고가 있는지 없는 지 확인 할 수 있다.
 
 @return 광고 view인 MobileAdView가 광고를 가지고 있다면 true, 없다면 false를 반환한다.
 */
-(BOOL)hasAd;

@end
